package com.diy.sigmund.junit5.mockito.demo1;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ylm-sigmund
 * @since 2023/7/9 17:22
 */
@Service
public class UserInfoService {

    @Autowired
    private UserInfoDao userInfoDao;

    public void printInfo(String str) {
        Customer customer = new Customer();
        System.out.println("调用new的对象调用print()打印："+customer.print(str));

        UserInfo userInfo = userInfoDao.select();
        UserInfo userInfo1 = userInfoDao.select();
        System.out.println(userInfo1);

        System.out.println(public1());
        System.out.println(static1());
        System.out.println(final1());
        System.out.println(private1(str));
    }

    public String public1(){
        return "public";
    }

    public static String static1(){
        return "static";
    }

    public final String final1(){
        return "final";
    }

    private String private1(String str){
        System.out.println("private1执行结果："+str);
        return str;
    }
}



